using DesktopWidgetApp.Shared;
using System;
using System.Collections.Generic;
using System.Threading.Tasks;

namespace DesktopWidgetApp.Core.Data
{
    /// <summary>
    /// 状态仓储接口
    /// </summary>
    public interface IStatusRepository : IRepository<Status>
    {
        /// <summary>
        /// 获取指定用户的所有状态记录
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns>状态记录列表</returns>
        Task<IEnumerable<Status>> GetByUserIdAsync(Guid userId);
        
        /// <summary>
        /// 获取指定用户的当前状态
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <returns>当前状态</returns>
        Task<Status> GetCurrentStatusByUserIdAsync(Guid userId);
        
        /// <summary>
        /// 获取指定类型的所有状态
        /// </summary>
        /// <param name="statusType">状态类型</param>
        /// <returns>指定类型的状态列表</returns>
        Task<IEnumerable<Status>> GetByStatusTypeAsync(StatusType statusType);
        
        /// <summary>
        /// 获取免打扰状态的所有用户
        /// </summary>
        /// <returns>免打扰状态的用户ID列表</returns>
        Task<IEnumerable<Guid>> GetDoNotDisturbUserIdsAsync();
        
        /// <summary>
        /// 结束用户的当前状态
        /// </summary>
        /// <param name="userId">用户ID</param>
        /// <param name="endTime">结束时间</param>
        Task EndCurrentStatusAsync(Guid userId, DateTime endTime);
    }
}